<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/mytag.jspf"%>%>

<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>user</title>
<script type="text/javascript">
$(function(){
	$("#vipForm").validate({
		rules :{
			"points" : {
				number : true,
				digits : true
			},
			"balance" : {
				number : true,
				isPriceOne : true
			},
			"balance2": {
				number : true,
				isPriceOne : true,
                equalTo: "#balance"
            },
		},
		messages :{
			"points" : {
				number : "请输入合法的数字",
				digits : "请输入整数"
			},
			"balance" : {
				number : "请输入合法的数字",
				isPriceOne : "余额最多保留一位小数"
			},
			"balance2" : {
				number : "请输入合法的数字",
				isPriceOne : "余额最多保留一位小数"
			}
		}
	});
});
$("#submitBtn").on("click",function(){
	layer.confirm('是否确定充值？', function(index) {
		$("form").submit();
	});
	
});
</script>
</head>

<body>
	<ol class="am-breadcrumb am-breadcrumb-slash am-padding" style="margin-bottom: 0px;">
		<li><a href="management/index">首页</a></li>
		<li class="am-active">会员余额管理</li>
	</ol>

	<div class="am-g">
		<div class="am-u-md-12">
				<div class="am-tabs am-margin">
					<ul class="am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a href="javascript:void(0)">会员基本信息</a></li>
					</ul>
					<div class="am-tabs-bd">
						<div class="am-tab-panel am-active">
							<div class="am-g">
								<div class="am-u-sm-12">
										<form id="vipForm" method="post" class="am-form am-form-horizontal" action="management/vip/balanceUpdate">
											<input type="hidden" name="vipId" id="vipId" value="${vip.vipId }" class="am-form-field am-input-sm"><!-- 会员id -->
											<input type="hidden" name="compId" id="compId" value="${vip.compId }" class="am-form-field am-input-sm"><!-- 企业id -->
											<input type="hidden" name="shopId" id="shopId" value="${vip.shopId }" class="am-form-field am-input-sm"><!-- 入会门店id -->	
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">会员卡号</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="vipNo" id="vipNo" value="${vip.vipNo}" class="am-form-field am-input-sm" readonly="readonly">
												</div>
											</div>
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">姓名</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="name" id="name" value="${vip.name }" class="am-form-field am-input-sm" readonly="readonly">
												</div>
											</div>
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">性别</label>
												<div class="am-u-sm-4 am-u-end am-form-label am-text-left">
													<input type="radio" name="sex" <c:if test="${vip.sex eq 'M'}"> checked="checked" </c:if> value="M"> 男
													<input type="radio" name="sex" <c:if test="${vip.sex eq 'F'}"> checked="checked" </c:if> value="F"> 女
												</div>
											</div>
											<!--
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">微信昵称</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="nickname" id="nickname" value="${vip.nickname }"  class="am-form-field am-input-sm" readonly="readonly">
												</div>
											</div>
											 
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">微信操作号</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="operId" id="operId" value="${vip.operId }" class="am-form-field am-input-sm">
												</div>
											</div>
											 -->
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">积分</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text"  name="points" id="points" value="${vip.points }" class="am-form-field am-input-sm" readonly>
												</div>
											</div>
											
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">余额</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text"  value=" ${vip.balance }" class="am-form-field am-input-sm" readonly>
												</div>
											</div>
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">充值金额</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="balance" id="balance" placeholder="请输入充值的金额" class="am-form-field am-input-sm">
												</div>
											</div>
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">确认输入充值金额</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="balance2" id="balance2" placeholder="请输入充值的金额" class="am-form-field am-input-sm">
												</div>
											</div>
											<!-- 
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">手机</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="phoneNo" id="phoneNo" value="${vip.phoneNo }" class="am-form-field am-input-sm" readonly="readonly">
												</div>
											</div>
											<div class="am-form-group">
												<label class="am-u-sm-2 am-form-label">身份证号</label>
												<div class="am-u-md-4 am-u-end">
													<input type="text" name="idNo" id="idNo" value="${vip.idNo }" class="am-form-field am-input-sm" readonly="readonly">
												</div>
											</div>
											 -->
										</form>
								</div>
							
							</div>
						</div>
					</div>
				</div>
				<div class="am-margin">
					<button class="am-btn am-btn-primary am-btn-xs" type="button" id="submitBtn"><span class="am-icon-check"></span> 充值</button>
					<a href="management/vip/balanceIndex"  class="am-btn am-btn-primary am-btn-xs"><span class="am-icon-times"></span> 取消</a>
				</div>
		</div>
	</div>
</body>
</html>
